Scenario #1102: Remove Phone Number From Contact Data

Properties

Required

Given

name value
partnerName Matthieu
phoneNumberKeyToRemove office

partnerContactUuid

HTTP GET "/api/hs/office/relations?relationType=PARTNER&personData=Matthieu" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "c0f43b0d-472a-45b3-9f6b-969c728b683b",
  "anchor" : {
    "uuid" : "882bda1d-4e5e-42f8-afdd-b9741d1c1f4e", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "53869a92-66f1-4e83-9850-80f2a708f39f", // Person: Michelle Matthieu
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michelle",
    "familyName" : "Matthieu"
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "8c06e07a-89e5-4b36-8049-09d785e2d47d", // Contact: Michelle Matthieu
    "caption" : "Michelle Matthieu",
    "postalAddress" : {
      "zipcode" : "22123",
      "country" : "Germany",
      "city" : "Hamburg",
      "street" : "An der Wandse 34",
      "name" : "Michelle Matthieu"
    },
    "emailAddresses" : {
      "main" : "michelle@matthieu.example.org"
    },
    "phoneNumbers" : {
      "mobile" : "+49 152 1234567",
      "office" : "+49 40 123456"
    }
  }
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

Patch the Additional Phone-Number into the Contact

HTTP PATCH "/api/hs/office/contacts/8c06e07a-89e5-4b36-8049-09d785e2d47d" // Contact: Michelle Matthieu \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  <<EOF
{
  "phoneNumbers" : {
    "office" : null
  }
}
EOF
=> status: 200 OK 

Verify if the New Phone Number Got Added

HTTP GET "/api/hs/office/relations?relationType=PARTNER&personData=Matthieu" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "c0f43b0d-472a-45b3-9f6b-969c728b683b",
  "anchor" : {
    "uuid" : "882bda1d-4e5e-42f8-afdd-b9741d1c1f4e", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "53869a92-66f1-4e83-9850-80f2a708f39f", // Person: Michelle Matthieu
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michelle",
    "familyName" : "Matthieu"
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "8c06e07a-89e5-4b36-8049-09d785e2d47d", // Contact: Michelle Matthieu
    "caption" : "Michelle Matthieu",
    "postalAddress" : {
      "zipcode" : "22123",
      "country" : "Germany",
      "city" : "Hamburg",
      "street" : "An der Wandse 34",
      "name" : "Michelle Matthieu"
    },
    "emailAddresses" : {
      "main" : "michelle@matthieu.example.org"
    },
    "phoneNumbers" : {
      "mobile" : "+49 152 1234567"
    }
  }
} ]

generated on 2026-08-10 04:34:20 for branch HEAD